package com.xywy.start;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.Window;
import android.widget.TextView;

import com.xywy.R;
import com.xywy.common.BaseActivity;
import com.xywy.common.FragmentMainActivity;
import com.xywy.common.widget.TitleBar2;

/**
 * 体验
 * @author xiaogd
 *
 */
public class ExperienceActivity extends BaseActivity{
    private static final String  TAG = "ExperienceActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState)  
    {
    	super.onCreate(savedInstanceState);    
        //设置为全屏
        requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.start_experience);

       this.initView();
       this.loadData();
        this.initHandler();
       this.setListener();
    }

    private void initHandler(){

    }


    @Override
    protected void onResume() {
        super.onResume();

    }

    @Override
    protected void onPause() {
        super.onPause();

    }

    @Override
    public void preInit() {

    }

    @Override
    public void initView() {
        //title
        TitleBar2 titleBar = (TitleBar2)findViewById(R.id.start_experience_title_bar);
        titleBar.onClickBack(this);
        titleBar.getGo().setVisibility(View.INVISIBLE);
        TextView tvTitle= titleBar.getTitle();
        tvTitle.setText(getString(R.string.tv_start_ljty));


    }

    @Override
    public void loadData() {

        handler.postDelayed(runnable, 2000);
    }
    Handler handler = new Handler();
    Runnable runnable = new Runnable() {
        @Override
        public void run() {
            // handler自带方法实现定时器
            try {
                Intent intent =new Intent(ExperienceActivity.this, FragmentMainActivity.class);
                startActivity(intent);
            } catch (Exception e) {
                e.printStackTrace();
                System.out.println("exception...");
            }
        }
    };


    private void  setListener(){

    }


}



